import location from "@/assets/images/location_picture.png";
import Enum from "./Enum";
/**
 * 符号渲染
 */
const SymbolUtils = {
  /**
   * 行政区渲染
   */
  AREA_RENDER: {
    type: "simple-fill",
    color: [18, 252, 252, 0],
    outline: {
      color: [0, 112, 255, 1],
      width: 4
    }
  },
  /**
   * 绘制多边形渲染
   */
  DRAW_POLYGON_RENDER: {
    type: "simple-fill",
    color: [18, 252, 252, 0],
    outline: {
      color: [253, 255, 27, 1],
      width: 2
    }
  },

  /**
   * 坡度默认渲染
   */
  PD_DEFAULT_RENDER: {
    type: "simple-fill",
    color: [203, 192, 250, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
   * 坡度默认渲染
   */
  PD_1_RENDER: {
    type: "simple-fill",
    color: [63, 156, 33, 0.5],
    outline: {
      color: [0, 0, 0, 0],
      width: 0
    }
  },
  /**
   * 坡度默认渲染
   */
  PD_2_RENDER: {
    type: "simple-fill",
    color: [177, 64, 179, 0.5],
    outline: {
      color: [0, 0, 0, 0],
      width: 0
    }
  },
  /**
   * 坡度默认渲染
   */
  PD_3_RENDER: {
    type: "simple-fill",
    color: [179, 80, 41, 0.5],
    outline: {
      color: [0, 0, 0, 0],
      width: 0
    }
  },
  /**
   * 坡度默认渲染
   */
  PD_4_RENDER: {
    type: "simple-fill",
    color: [51, 152, 189, 0.5],
    outline: {
      color: [0, 0, 0, 0],
      width: 0
    }
  },
  /**
   * 坡度默认渲染
   */
  PD_5_RENDER: {
    type: "simple-fill",
    color: [196, 174, 49, 0.5],
    outline: {
      color: [0, 0, 0, 0],
      width: 0
    }
  },
  /**
   * 坡度渲染
   */
  PD_RENDER: {
    type: "simple-fill",
    color: [203, 192, 250, 255],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
   * 同质化默认
   */
  TZH_DEFAULT: {
    type: "simple-fill",
    color: [213, 190, 250, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
   * 空值
   */
  TZH_NOT_VALUE: {
    type: "simple-fill",
    color: [156, 250, 125, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
   * 同质化值1915201
   */
  TZH_1915201: {
    type: "simple-fill",
    color: [242, 94, 205, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
   * 同质化值1915202
   */
  TZH_1915202: {
    type: "simple-fill",
    color: [71, 133, 166, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
   * 同质化值1915203
   */
  TZH_1915203: {
    type: "simple-fill",
    color: [171, 114, 62, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
         * 同质化值1915204
         */
  TZH_1915204: {
    type: "simple-fill",
    color: [98, 101, 240, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
   * 同质化值 1915205
   */
  TZH_1915205: {
    type: "simple-fill",
    color: [126, 242, 223, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
   * 同质化值 1915206
   */
  TZH_1915206: {
    type: "simple-fill",
    color: [140, 55, 78, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
  * 同质化值 1915207
  */
  TZH_1915207: {
    type: "simple-fill",
    color: [97, 133, 72, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
     * 同质化值 1915213
     */
  TZH_1915213: {
    type: "simple-fill",
    color: [235, 157, 189, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
   * 同质化值 1915224
   */
  TZH_1915224: {
    type: "simple-fill",
    color: [242, 209, 99, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
         * 同质化值 1915226
         */
  TZH_1915226: {
    type: "simple-fill",
    color: [48, 66, 130, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
         * 同质化值 1915230
         */
  TZH_1915230: {
    type: "simple-fill",
    color: [247, 99, 109, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
         * 同质化值 1915231
         */
  TZH_1915231: {
    type: "simple-fill",
    color: [142, 151, 232, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
   * 同质化值 1915232
   */
  TZH_1915232: {
    type: "simple-fill",
    color: [121, 64, 128, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },
  /**
         * 同质化值 1915233
         */
  TZH_1915233: {
    type: "simple-fill",
    color: [179, 163, 118, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
   * 同质化值 1915234
   */
  TZH_1915234: {
    type: "simple-fill",
    color: [210, 232, 149, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },


  /**
   * 同质化值 1915403
   */
  TZH_1915403: {
    type: "simple-fill",
    color: [77, 145, 127, 0.5],
    outline: {
      color: [110, 110, 110, 255],
      width: 0
    }
  },

  /**
   * 图形高亮
   */
  HIGHLIGHT_RENDER: {
    type: "simple-fill",
    color: [203, 192, 250, 0],
    outline: {
      color: [18, 252, 252, 1],
      width: 1
    }
  },
  /**
   * 定位
   */
  LOCATION_PICTURE: {
    type: "picture-marker",
    url: location,
    width: "32px",
    height: "46px",
    xoffset: 0,
    yoffset: 10
  },

  /**
   * 
   * @param {*} value 
   */
  setRenderer(value) {
    switch (value) {
      case Enum.PDJB.PDJB_1:
        return this.PD_1_RENDER;
      case Enum.PDJB.PDJB_2:
        return this.PD_2_RENDER;
      case Enum.PDJB.PDJB_3:
        return this.PD_3_RENDER;
      case Enum.PDJB.PDJB_4:
        return this.PD_4_RENDER;
      case Enum.PDJB.PDJB_5:
        return this.PD_5_RENDER;
      default:
        return this.PD_DEFAULT_RENDER;
    }
  },
  /**
   * 设置同质化样式
   * @param {*} value 
   */
  setTZHRenderer(value) {
    switch (value) {
      case Enum.TZH.TZH_NOT_VALUE:
        return this.TZH_NOT_VALUE;
      case Enum.TZH.TZH_1915201:
        return this.TZH_1915201;
      case Enum.TZH.TZH_1915202:
        return this.TZH_1915202;
      case Enum.TZH.TZH_1915203:
        return this.TZH_1915203;
      case Enum.TZH.TZH_1915204:
        return this.TZH_1915204;
      case Enum.TZH.TZH_1915205:
        return this.TZH_1915205;
      case Enum.TZH.TZH_1915206:
        return this.TZH_1915206;
      case Enum.TZH.TZH_1915207:
        return this.TZH_1915207;
      case Enum.TZH.TZH_1915213:
        return this.TZH_1915213;
      case Enum.TZH.TZH_1915224:
        return this.TZH_1915224;
      case Enum.TZH.TZH_1915226:
        return this.TZH_1915226;
      case Enum.TZH.TZH_1915230:
        return this.TZH_1915230;
      case Enum.TZH.TZH_1915231:
        return this.TZH_1915231;
      case Enum.TZH.TZH_1915232:
        return this.TZH_1915232;
      case Enum.TZH.TZH_1915233:
        return this.TZH_1915233;
      case Enum.TZH.TZH_1915234:
        return this.TZH_1915234;
      case Enum.TZH.TZH_1915403:
        return this.TZH_1915403;
      default:
        return this.TZH_DEFAULT;
    }
  },

}
export default SymbolUtils;